package com.example.spider.provider.cctv;

import com.example.spider.provider.cctv.task.CctvNewsListTask;

/**
 * 爬虫任务创建器
 *
 * @author lym
 */
public class CctvNewsListTaskFactory {

    public static CctvNewsListTask createTask(int pageNo) {
        String urlTemplate = "http://news.cctv.com/2019/07/gaiban/cmsdatainterface/page/news_%d.jsonp?cb=t&cb=news";
        return new CctvNewsListTask()
                .setPage(pageNo)
                .setUrl(String.format(urlTemplate, pageNo));
    }

}
